import express from 'express';
import {
    addRibutes, getTagsByUsersAndFamily, deleteRibutes
} from '../controllers/attributesController';
import { tokenVerification } from '../middlewares/tokenVerification';
// 强制将 tokenVerification 转换为 RequestHandler 类型
import { RequestHandler } from 'express';

const router = express.Router();

// 创建自定义属性 
router.post('/addRibute', tokenVerification as RequestHandler, addRibutes);

// 获取属性  deleteRibute
router.get('/getTagsByUsersAndFamily', tokenVerification as RequestHandler, getTagsByUsersAndFamily)

//删除属性
router.post('/deleteRibutes', tokenVerification as RequestHandler, deleteRibutes)

export default router;
